/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jifIngresarProveedor.java
 *
 * Created on 14/07/2010, 02:26:01 PM
 */

package Proveedores;
import administracion.delegate.GestionPedidosDelegate;
import administracion.helper.Utiles_MensajesDialogo;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import administracion.helper.Listas;
import administracion.helper.Utiles_Validar;
import com.jidesoft.hints.ListDataIntelliHints;
import java.awt.event.KeyEvent;
import java.text.ParseException;
import javax.swing.JOptionPane;
import javax.swing.text.MaskFormatter;
import suministros.ejb30.TO.DepartamentoTO;
import suministros.ejb30.TO.DistritoTO;
import suministros.ejb30.TO.PaisTO;
import suministros.ejb30.TO.ProveedorTO;
import suministros.ejb30.TO.ProvinciaTO;
import suministros.ejb30.TO.TipoTO;
import suministros.ejb30.entity.Departamento;
import suministros.ejb30.entity.Direccionnopersona;
import suministros.ejb30.entity.Distrito;
import suministros.ejb30.entity.Localidad;
import suministros.ejb30.entity.Pais;
import suministros.ejb30.entity.Proveedor;
import suministros.ejb30.entity.Provincia;
import suministros.ejb30.entity.Tipo;
import suministros.ejb30.helper.Utiles_Convertir;

/**
 *
 * @author Arturo
 */
public class jifIngresarProveedor extends javax.swing.JInternalFrame {
         Tipo via;
         Tipo residencia;
         Pais pais;
         Distrito dis;
         private MaskFormatter mascaraRuc;
        private MaskFormatter mascaraDni;
        private MaskFormatter RPNServicios;
        private MaskFormatter RPNBienes;
        private MaskFormatter mascaraNumero;

    /** Creates new form jifIngresarProveedor */
    public jifIngresarProveedor() {
         construirMascaras();
        initComponents();
        llenarComboDepartamento();
        llenarComboResidencia();
        llenarComboPaises();
        llenarComboVia();
        this.jrbNacional.setSelected(true);
        this.jcboPais.setSelectedIndex(0);
        this.ocultaPanel();
    }
    private void construirMascaras() {
        try {
          this.mascaraDni = new MaskFormatter("########");
          this.RPNBienes = new MaskFormatter("##########");
          this.RPNServicios = new MaskFormatter("##########");
          this.mascaraNumero= new MaskFormatter("#0");

        } catch (ParseException ex) {
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
          ex.printStackTrace();
        }
     }
     private void llenarComboDepartamento() {
        List listaDepartamento = null;
        List listaDepartamento_cbo = this.cboBeanBindingDepartamento1.getLista();
        listaDepartamento_cbo.clear();
        try
        {
          listaDepartamento = Listas.getDepartamentos();
          this.cboBeanBindingDepartamento1.setLista(listaDepartamento);
          this.bindingGroup.bind();
          this.jcboDepartamento.updateUI();
          this.jcboDepartamento.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener deparamentos\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
      private void llenarComboProvincia() {
        List listaProvincia = null;
        List listaProvincia_cbo = this.cboBeanBindingProvincia1.getLista();
        listaProvincia_cbo.clear();
        try
        {
          Departamento depa = Utiles_Convertir.convertirToDepartamento_DepartamentoTO((DepartamentoTO)this.jcboDepartamento.getSelectedItem());
          listaProvincia = GestionPedidosDelegate.getInstance().listaProvincias(depa.getCoddepto());
          if(!listaProvincia.isEmpty()){
              this.cboBeanBindingProvincia1.setLista(listaProvincia);
              this.bindingGroup.bind();
              this.jcboProvincia.updateUI();
              this.jcboProvincia.setSelectedIndex(0);
          }
          else{
              this.jcboProvincia.removeAllItems();
          }

        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener provincias\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
        }

      private void llenarComboDistrito() {
        List listaDistrito = null;
        List listaDistrito_cbo = this.cboBeanBindingDistrito1.getLista();
        listaDistrito_cbo.clear();
        try
        {
          Provincia pro = Utiles_Convertir.convertirToPronvincia_ProvinciaTO((ProvinciaTO)this.jcboProvincia.getSelectedItem());
          listaDistrito = GestionPedidosDelegate.getInstance().listaDistritos(pro.getCodprovincia());
          if(!listaDistrito.isEmpty()) {
              this.cboBeanBindingDistrito1.setLista(listaDistrito);
              this.bindingGroup.bind();
              this.jcboDistrito.updateUI();
              this.jcboDistrito.setSelectedIndex(0);
          }
          else{
              this.jcboDistrito.removeAllItems();
          }
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener distrito\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
      private void llenarComboResidencia() {
        List listaTipos = null;
        List listaTipos_cbo = this.cboBeanBindingTipo1.getLista();
        listaTipos_cbo.clear();
        try
        {
          listaTipos = Listas.getTipo_porTabla("tipo_lugar_residencia");

          this.cboBeanBindingTipo1.setLista(listaTipos);
          this.bindingGroup.bind();
          this.jcboLugarResidencia.updateUI();
          this.jcboLugarResidencia.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener Residencia\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
      private void llenarComboPaises() {
        List listaPaises = null;
        List listaPaises_cbo = this.cboBeanBindingPais1.getLista();
        listaPaises_cbo.clear();
        try
        {
          listaPaises = Listas.getPaises();
          this.cboBeanBindingPais1.setLista(listaPaises);
          this.bindingGroup.bind();
          this.jcboPais.updateUI();
          this.jcboPais.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener paises\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
       private void llenarComboVia() {
        List listaTipos2 = null;
        List listaTipos_cbo2 = this.cboBeanBindingTipo2.getLista();
        listaTipos_cbo2.clear();
        try
        {
          listaTipos2 = Listas.getTipo_porTabla("tipo_via");

          this.cboBeanBindingTipo2.setLista(listaTipos2);
          this.bindingGroup.bind();
          this.jcboTipoVia.updateUI();
          this.jcboTipoVia.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener Vias\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
     private void ocultaPanel()
      {
        boolean ocultar = this.jrbNacional.isSelected();
        String texto = null;
        this.jpNacional.setVisible(ocultar);
        if (!ocultar) {
          this.jftReferencia.setText(texto);
        }
        this.pack();
    }
    public void registrarProveedor(){
         Proveedor pro= new Proveedor();
         pro.setCodProveedor(this.jftRuc1.getText());
         pro.setRazonSocial(this.jftfRazon.getText());
         if(this.jftDni.getText().compareTo("")!=0)
         pro.setDniRepLegal(this.jftDni.getText());
         if(this.jftTelefono.getText().compareTo("")!=0)
         pro.setTelefonos(this.jftTelefono.getText());
         if(this.jftFax.getText().compareTo("")!=0)
         pro.setFax(this.jftFax.getText());
         if(this.jftCorreo.getText().compareTo("")!=0)
         pro.setCorreo(this.jftCorreo.getText());
         if(this.jftGiroNegocio.getText().compareTo("")!=0)
         pro.setGiroNegocio(this.jftGiroNegocio.getText());
         if(this.jftRepresentante.getText().compareTo("")!=0)
         pro.setRepLegal(this.jftRepresentante.getText());
         boolean cos=false;
         if(this.jckCosechador.isSelected()){
             cos=true;
         }
         pro.setIsCosechador(cos);
         Direccionnopersona dir= new Direccionnopersona();

         if(this.jrbNacional.isSelected()){
              if(dis== null){
                 dir.setCodpais(pais);
              }
              else{
                 dir.setCodTipoLugarResidencia(residencia);
                 dir.setCodTipoVia(via);
                 dir.setCodpais(pais);
                 dir.setCodDistritoDir(dis);
                   if(this.jftResidencia.getText().compareTo("")!=0)
                 dir.setLugarResidencia(this.jftResidencia.getText());
                   if(this.jftVia.getText().compareTo("")!=0)
                 dir.setNomVia(this.jftVia.getText());
                   if(this.jftNumero.getText().compareTo("")!=0)
                 dir.setNumero(this.jftNumero.getText());
                   if(this.jftReferencia.getText().compareTo("")!=0)
                 dir.setReferDir(this.jftReferencia.getText());
                
              }
             
         }
         else{
             dir.setCodpais(pais);
         }
        
        try {
            GestionPedidosDelegate.getInstance().insertarProveedor(pro, dir);
        } catch (Exception ex) {
            Logger.getLogger(jifIngresarProveedor.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
    public void limpiar(){
     this.jftRuc1.setText("");
     this.jftfRazon.setText("");
     this.jftCorreo.setText("");
     this.jftDni.setText("");
     this.jftFax.setText("");
     this.jftGiroNegocio.setText("");
     this.jftNumero.setText("");;
     this.jftReferencia.setText("");
     this.jftRepresentante.setText("");
     this.jftResidencia.setText("");
     this.jftTelefono.setText("");
     this.jftVia.setText("");
     this.jcboDepartamento.setSelectedIndex(0);
     this.jcboDistrito.setSelectedIndex(0);
     this.jcboLugarResidencia.setSelectedIndex(0);
     this.jcboPais.setSelectedIndex(0);
     this.jcboProvincia.setSelectedIndex(0);
     this.jcboTipoVia.setSelectedIndex(0);
     this.jrbNacional.setSelected(true);

 }
    public void verificaGuardaDatos() throws Exception {
      
         pais = Utiles_Convertir.convertirToPais_PaisTO((PaisTO)this.jcboPais.getSelectedItem());

        if(this.jftRuc1.getText().compareTo("")==0){
             throw new Exception("Debe ingresar un numero de ruc");
        }
         if(this.jftfRazon.getText().compareTo("")==0){
             throw new Exception("Debe ingresar un nombre de razon social");
        }
        if(this.pais==null){
             throw new Exception("Debe seleccionar un pais");
        }
        if(this.jrbNacional.isSelected()){
          if(this.jcboTipoVia.getSelectedIndex()>-1)
          via = Utiles_Convertir.convertirToTipo_TipoTO((TipoTO)this.jcboTipoVia.getSelectedItem());
          if(this.jcboLugarResidencia.getSelectedIndex()>-1)
          residencia = Utiles_Convertir.convertirToTipo_TipoTO((TipoTO)this.jcboLugarResidencia.getSelectedItem());
          if(this.jcboDistrito.getSelectedIndex()>-1)
          dis = Utiles_Convertir.convertirToDistrito_DistritoTO((DistritoTO)this.jcboDistrito.getSelectedItem());
           
        }
        this.registrarProveedor();

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        buttonGroup1 = new javax.swing.ButtonGroup();
        cboBeanBindingDepartamento1 = new administracion.BeanBinding.CboBeanBindingDepartamento();
        cboBeanBindingProvincia1 = new administracion.BeanBinding.CboBeanBindingProvincia();
        cboBeanBindingDistrito1 = new administracion.BeanBinding.CboBeanBindingDistrito();
        cboBeanBindingPais1 = new administracion.BeanBinding.CboBeanBindingPais();
        cboBeanBindingTipo1 = new administracion.BeanBinding.CboBeanBindingTipo();
        cboBeanBindingTipo2 = new administracion.BeanBinding.CboBeanBindingTipo();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jrbNacional = new javax.swing.JRadioButton();
        jrbExtranjero = new javax.swing.JRadioButton();
        jftfRazon = new javax.swing.JTextField();
        jftRepresentante = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jftTelefono = new javax.swing.JTextField();
        jftFax = new javax.swing.JTextField();
        jftCorreo = new javax.swing.JTextField();
        jComboBox5 = new javax.swing.JComboBox();
        jbAceptar = new javax.swing.JButton();
        jbCancelar = new javax.swing.JButton();
        jpNacional = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jcboTipoVia = new javax.swing.JComboBox();
        jLabel15 = new javax.swing.JLabel();
        jftResidencia = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jftVia = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jcboDepartamento = new javax.swing.JComboBox();
        jcboProvincia = new javax.swing.JComboBox();
        jcboLugarResidencia = new javax.swing.JComboBox();
        jcboDistrito = new javax.swing.JComboBox();
        jftNumero = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jftReferencia = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jcboPais = new javax.swing.JComboBox();
        jLabel21 = new javax.swing.JLabel();
        jftGiroNegocio = new javax.swing.JTextField();
        jftDni = new javax.swing.JFormattedTextField(this.mascaraDni);
        jckCosechador = new javax.swing.JCheckBox();
        jftRuc1 = new javax.swing.JTextField();

        setIconifiable(true);
        setResizable(true);
        setTitle("REGISTRAR PROVEEDORES");
        setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/logo.gif"))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel1.setText("RUC de Proveedor:");

        jLabel2.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel2.setText("Razon Social:");

        jLabel3.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel3.setText("Representante Legal:");

        jLabel4.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel4.setText("DNI Representante:");

        jLabel5.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel5.setText("Procedencia: ");

        buttonGroup1.add(jrbNacional);
        jrbNacional.setFont(new java.awt.Font("Arial", 1, 12));
        jrbNacional.setText("Nacional");
        jrbNacional.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbNacionalActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbExtranjero);
        jrbExtranjero.setFont(new java.awt.Font("Arial", 1, 12));
        jrbExtranjero.setText("Extranjera");
        jrbExtranjero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbExtranjeroActionPerformed(evt);
            }
        });

        jftfRazon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jftfRazonActionPerformed(evt);
            }
        });
        jftfRazon.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftfRazonKeyPressed(evt);
            }
        });

        jftRepresentante.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftRepresentanteKeyPressed(evt);
            }
        });

        jLabel11.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel11.setText("Telefono:");

        jLabel12.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel12.setText("Fax:");

        jLabel13.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel13.setText("Correo:");

        jftTelefono.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftTelefonoKeyPressed(evt);
            }
        });

        jftFax.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftFaxKeyPressed(evt);
            }
        });

        jftCorreo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftCorreoKeyPressed(evt);
            }
        });

        jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jbAceptar.setFont(new java.awt.Font("Arial", 1, 12));
        jbAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/apply.png"))); // NOI18N
        jbAceptar.setText("Aceptar");
        jbAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbAceptarActionPerformed(evt);
            }
        });

        jbCancelar.setFont(new java.awt.Font("Arial", 1, 12));
        jbCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/button_cancel.png"))); // NOI18N
        jbCancelar.setText("Cerrar");
        jbCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCancelarActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel6.setText("Departamento");

        jLabel7.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel7.setText("Provincia");

        jLabel8.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel8.setText("Distrito");

        jLabel14.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel14.setText("Tipo Via:");

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingTipo2, eLProperty, jcboTipoVia);
        bindingGroup.addBinding(jComboBoxBinding);

        jLabel15.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel15.setText("Nombre Via:");

        jLabel16.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel16.setText("Tipo Lugar Residencia:");

        jLabel17.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel17.setText("Lugar Residencia:");

        jLabel18.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel18.setText("Numero:");

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingDepartamento1, eLProperty, jcboDepartamento);
        bindingGroup.addBinding(jComboBoxBinding);

        jcboDepartamento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jcboDepartamentoItemStateChanged(evt);
            }
        });
        jcboDepartamento.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jcboDepartamentoKeyReleased(evt);
            }
        });

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingProvincia1, eLProperty, jcboProvincia);
        bindingGroup.addBinding(jComboBoxBinding);

        jcboProvincia.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jcboProvinciaItemStateChanged(evt);
            }
        });

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingTipo1, eLProperty, jcboLugarResidencia);
        bindingGroup.addBinding(jComboBoxBinding);

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingDistrito1, eLProperty, jcboDistrito);
        bindingGroup.addBinding(jComboBoxBinding);

        jcboDistrito.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jcboDistritoItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jpNacionalLayout = new javax.swing.GroupLayout(jpNacional);
        jpNacional.setLayout(jpNacionalLayout);
        jpNacionalLayout.setHorizontalGroup(
            jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpNacionalLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpNacionalLayout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(49, 49, 49)
                        .addComponent(jcboDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20)
                        .addComponent(jLabel7)
                        .addGap(27, 27, 27)
                        .addComponent(jcboProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jLabel8)
                        .addGap(9, 9, 9)
                        .addComponent(jcboDistrito, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpNacionalLayout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(1, 1, 1)
                        .addComponent(jcboLugarResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20)
                        .addComponent(jLabel17)
                        .addGap(8, 8, 8)
                        .addComponent(jftResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpNacionalLayout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addGap(82, 82, 82)
                        .addComponent(jcboTipoVia, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20)
                        .addComponent(jLabel15)
                        .addGap(41, 41, 41)
                        .addComponent(jftVia, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jftNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );
        jpNacionalLayout.setVerticalGroup(
            jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpNacionalLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jcboDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jcboProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jcboDistrito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16)
                    .addComponent(jcboLugarResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17)
                    .addComponent(jftResidencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jcboTipoVia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(jftVia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jpNacionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel18)
                        .addComponent(jftNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel19.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel19.setText("Referencia:");

        jLabel20.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel20.setText("Pais:");

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingPais1, eLProperty, jcboPais);
        bindingGroup.addBinding(jComboBoxBinding);

        jLabel21.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel21.setText("Giro del Negocio:");

        jftDni.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jftDniActionPerformed(evt);
            }
        });
        jftDni.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftDniKeyPressed(evt);
            }
        });

        jckCosechador.setFont(new java.awt.Font("Arial", 1, 12));
        jckCosechador.setText("COSECHADOR");

        jftRuc1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jftRuc1KeyPressed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLabel1)
                        .addGap(18, 18, 18)
                        .addComponent(jftRuc1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel2)
                        .addGap(54, 54, 54)
                        .addComponent(jftfRazon, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(723, 723, 723)
                        .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addGap(42, 42, 42)
                                    .addComponent(jrbNacional)
                                    .addGap(25, 25, 25)
                                    .addComponent(jrbExtranjero)
                                    .addGap(75, 75, 75)
                                    .addComponent(jLabel20)
                                    .addGap(2, 2, 2)
                                    .addComponent(jcboPais, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel11)
                                            .addGap(68, 68, 68)
                                            .addComponent(jftTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(20, 20, 20)
                                            .addComponent(jLabel12)
                                            .addGap(17, 17, 17)
                                            .addComponent(jftFax, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(25, 25, 25)
                                            .addComponent(jLabel13))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel21)
                                            .addGap(25, 25, 25)
                                            .addComponent(jftGiroNegocio, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jckCosechador)
                                        .addComponent(jftCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jftDni, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(21, 21, 21)
                                .addComponent(jLabel3)
                                .addGap(9, 9, 9)
                                .addComponent(jftRepresentante, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jpNacional, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel19)
                                .addGap(64, 64, 64)
                                .addComponent(jftReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, 570, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(250, 250, 250)
                                .addComponent(jbAceptar)
                                .addGap(13, 13, 13)
                                .addComponent(jbCancelar)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel1)
                        .addComponent(jLabel2)
                        .addComponent(jftfRazon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jftRuc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(jftDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel3)
                    .addComponent(jftRepresentante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11)
                    .addComponent(jftTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(jftFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel13)
                        .addComponent(jftCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jftGiroNegocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jckCosechador)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(100, 100, 100)
                        .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jrbNacional)
                            .addComponent(jrbExtranjero)
                            .addComponent(jLabel20)
                            .addComponent(jcboPais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jpNacional, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jftReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbAceptar)
                    .addComponent(jbCancelar))
                .addContainerGap(25, Short.MAX_VALUE))
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jrbNacionalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbNacionalActionPerformed
        this.jcboPais.setSelectedIndex(0);
        this.jcboPais.setEnabled(false);
        this.ocultaPanel();
    }//GEN-LAST:event_jrbNacionalActionPerformed

    private void jcboDepartamentoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jcboDepartamentoKeyReleased
 
    }//GEN-LAST:event_jcboDepartamentoKeyReleased

    private void jcboDepartamentoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jcboDepartamentoItemStateChanged
        if (this.jcboDepartamento.getSelectedIndex() >= 0)
            this.llenarComboProvincia();
    }//GEN-LAST:event_jcboDepartamentoItemStateChanged

    private void jcboDistritoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jcboDistritoItemStateChanged
        
    }//GEN-LAST:event_jcboDistritoItemStateChanged

    private void jcboProvinciaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jcboProvinciaItemStateChanged
       if (this.jcboProvincia.getSelectedIndex() >= 0)
            this.llenarComboDistrito();
    }//GEN-LAST:event_jcboProvinciaItemStateChanged

    private void jrbExtranjeroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbExtranjeroActionPerformed
           ocultaPanel();
           this.jcboPais.setEnabled(true);
    }//GEN-LAST:event_jrbExtranjeroActionPerformed

    private void jbAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbAceptarActionPerformed
      if (Utiles_MensajesDialogo.mensajeConfirmacion("Esta seguro de registrar el proveedor?")){
         try {
          verificaGuardaDatos();
          Utiles_MensajesDialogo.mensajeInfo("Se guardo el proveedor Correctamente");
          limpiar();
          this.llenarComboDepartamento();
          this.llenarComboPaises();
          this.llenarComboResidencia();
          this.llenarComboVia();
          Listas.cargarProveedores();
          Listas.cargarCosechador();
        }
        catch (Exception e) {
          Utiles_MensajesDialogo.mensajeError(e.getMessage());
        }        
      }


    }//GEN-LAST:event_jbAceptarActionPerformed

    private void jbCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCancelarActionPerformed

      int res = javax.swing.JOptionPane.showConfirmDialog( this,"Esta seguro de salir?",
      "Confirmar",javax.swing.JOptionPane.YES_NO_OPTION );
            if(res==javax.swing.JOptionPane.YES_OPTION){
                    this.dispose();
     }

    }//GEN-LAST:event_jbCancelarActionPerformed

    private void jftfRazonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftfRazonActionPerformed


    }//GEN-LAST:event_jftfRazonActionPerformed

    private void jftfRazonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftfRazonKeyPressed
       if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
           this.jftDni.requestFocus();

        }
    }//GEN-LAST:event_jftfRazonKeyPressed

    private void jftRepresentanteKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftRepresentanteKeyPressed
         if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
           this.jftTelefono.requestFocus();
        }
    }//GEN-LAST:event_jftRepresentanteKeyPressed

    private void jftDniKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftDniKeyPressed
        if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
            if(!(this.jftDni.getText().length()==0)){
                try {
                Utiles_Validar.isValidoDNINumeros(this.jftDni.getText());
                this.jftRepresentante.requestFocus();
                } catch (Exception ex) {
                    JOptionPane.showMessageDialog(this,ex.getMessage(),"Erro de ingreso",JOptionPane.ERROR_MESSAGE );
                }
            }
           
        }
    }//GEN-LAST:event_jftDniKeyPressed

    private void jftTelefonoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftTelefonoKeyPressed
       if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
           this.jftFax.requestFocus();
        }
    }//GEN-LAST:event_jftTelefonoKeyPressed

    private void jftCorreoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftCorreoKeyPressed
        if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
           this.jftCorreo.requestFocus();
        }
    }//GEN-LAST:event_jftCorreoKeyPressed

    private void jftFaxKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftFaxKeyPressed
        if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
           this.jftGiroNegocio.requestFocus();
        }
    }//GEN-LAST:event_jftFaxKeyPressed

    private void jftDniActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftDniActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jftDniActionPerformed

    private void jftRuc1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jftRuc1KeyPressed
         if(KeyEvent.VK_ENTER == evt.getKeyCode() ){
            try {
                String ruc= this.jftRuc1.getText().trim();
                if(ruc.length()==11){
                     Utiles_Validar.isValidoRUC(this.jftRuc1.getText());
                }
                else{
                    if(ruc.length()==8){
                       Utiles_Validar.isValidoDNINumeros(this.jftDni.getText());
                    }
                    else{
                       JOptionPane.showMessageDialog(this,"No ha ingresado un ruc valido o un dni","Erro de ingreso",JOptionPane.ERROR_MESSAGE );
                    }
                }
                this.jftfRazon.requestFocus();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.getMessage(),"Erro de ingreso",JOptionPane.ERROR_MESSAGE );
            }
        }
    }//GEN-LAST:event_jftRuc1KeyPressed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private administracion.BeanBinding.CboBeanBindingDepartamento cboBeanBindingDepartamento1;
    private administracion.BeanBinding.CboBeanBindingDistrito cboBeanBindingDistrito1;
    private administracion.BeanBinding.CboBeanBindingPais cboBeanBindingPais1;
    private administracion.BeanBinding.CboBeanBindingProvincia cboBeanBindingProvincia1;
    private administracion.BeanBinding.CboBeanBindingTipo cboBeanBindingTipo1;
    private administracion.BeanBinding.CboBeanBindingTipo cboBeanBindingTipo2;
    private javax.swing.JComboBox jComboBox5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JButton jbAceptar;
    private javax.swing.JButton jbCancelar;
    private javax.swing.JComboBox jcboDepartamento;
    private javax.swing.JComboBox jcboDistrito;
    private javax.swing.JComboBox jcboLugarResidencia;
    private javax.swing.JComboBox jcboPais;
    private javax.swing.JComboBox jcboProvincia;
    private javax.swing.JComboBox jcboTipoVia;
    private javax.swing.JCheckBox jckCosechador;
    private javax.swing.JTextField jftCorreo;
    private javax.swing.JFormattedTextField jftDni;
    private javax.swing.JTextField jftFax;
    private javax.swing.JTextField jftGiroNegocio;
    private javax.swing.JTextField jftNumero;
    private javax.swing.JTextField jftReferencia;
    private javax.swing.JTextField jftRepresentante;
    private javax.swing.JTextField jftResidencia;
    private javax.swing.JTextField jftRuc1;
    private javax.swing.JTextField jftTelefono;
    private javax.swing.JTextField jftVia;
    private javax.swing.JTextField jftfRazon;
    private javax.swing.JPanel jpNacional;
    private javax.swing.JRadioButton jrbExtranjero;
    private javax.swing.JRadioButton jrbNacional;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
